using System.Data;
using ET;
namespace DAL
{
    public class Quotes_Provision_DAL
    {
        private static readonly clsConnect cls = new clsConnect();

        #region Getdata
        public DataTable BindGirdtb_Quotes_Provision(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@QuotesID", id);
            return cls.GetData("sp_tb_Quotes_Provision_Search");
        }
        #endregion

        #region Insert
        public bool Inserttb_Quotes_Provision(Quotes_Provision_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Quotes_Provision_Name", data.Quotes_Provision_Name);
            cls.AddParameter("@Quotes_Provision_Value", data.Quotes_Provision_Value);
            cls.AddParameter("@Quotes_ID", data.Quotes_ID);
            return cls.ExecuteNonQuery("sp_tb_Quotes_Provision_Insert");
        }
        #endregion

        #region Update
        public bool Updatetb_Quotes_Provision(Quotes_Provision_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Quotes_Provision_ID", data.Quotes_Provision_Id);
            cls.AddParameter("@Quotes_Provision_Name", data.Quotes_Provision_Name);
            cls.AddParameter("@Quotes_Provision_Value", data.Quotes_Provision_Value);
            cls.AddParameter("@Quotes_ID", data.Quotes_ID);
            return cls.ExecuteNonQuery("sp_tb_Quotes_Provision_Update");
        }
        #endregion

        #region Delete
        public bool Deletetb_Quotes_Provision(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Quotes_Provision_ID", id);
            return cls.ExecuteNonQuery("sp_tb_Quotes_Provision_Delete");
        }
        public bool Deletetb_Quotes_Provision_DefaultID(int Quotes_ID)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Quotes_ID", Quotes_ID);
            cls.ExecuteNonQuery("sp_tb_Quotes_Provision_Delete_Quotes_ID");
            return true;
        }
        #endregion
    }
}